package com.sky.mapper.common;

import com.sky.pojo.SetmealDish;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface SetmealDishMapper {
    @Select("SELECT dish_id FROM  setmeal_dish WHERE setmeal_id = #{id}")
    Long findDishBySetmealId(Long id);

    // 批量插入套餐和菜品关系数据
    void insertBatch(List<SetmealDish> setmealDishes);
    //删除套餐和菜品的关联关系
    @Delete("delete from setmeal_dish where setmeal_id = #{setmealId}")
    void deleteBySetmealId(Long setmealId);
}
